﻿CREATE PROCEDURE [dbo].[GetLastEntries]

AS
SELECT MAX(el.EntryDate) AS LastEntry, u.UserID
FROM  EntryLog el INNER JOIN
               Users u ON el.UserID = u.UserID and u.IsActive = 1
GROUP BY u.FullName, u.UserID
ORDER BY LastEntry DESC

